Frontend Forever App
We have a mobile app for you to download and use. And you can unlock many features in the app.
Get it now
Intall Later
Run
HTML
CSS
Javascript
Output
Untitled-5
svg{ height:200px; } .content{ position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); display:block; } .bubble { width: 30px; height: 30px; background: lightblue; border-radius: 200px; -moz-border-radius: 200px; -webkit-border-radius: 200px; position: absolute; } .x1 { -webkit-transform: scale(0.9); -moz-transform: scale(0.9); transform: scale(0.9); opacity: 0.2; -webkit-animation: moveBubblesX 15s linear infinite, moveBubblesY 6s ease-in-out infinite alternate; -moz-animation: moveBubblesX 15s linear infinite, moveBubblesY 6s ease-in-out infinite alternate; -o-animation: moveBubblesX 15s linear infinite, moveBubblesY 6s ease-in-out infinite alternate; } .x2 { left: 200px; -webkit-transform: scale(0.6); -moz-transform: scale(0.6); transform: scale(0.6); opacity: 0.5; -webkit-animation: moveBubblesX 25s linear infinite, moveBubblesY 8s ease-in-out infinite alternate; -moz-animation: moveBubblesX 25s linear infinite, moveBubblesY 8s ease-in-out infinite alternate; -o-animation: moveBubblesX 25s linear infinite, moveBubblesY 8s ease-in-out infinite alternate; } .x3 { left: 350px; -webkit-transform: scale(0.8); -moz-transform: scale(0.8); transform: scale(0.8); opacity: 0.3; -webkit-animation: moveBubblesX 20s linear infinite, moveBubblesY 4s ease-in-out infinite alternate; -moz-animation: moveBubblesX 20s linear infinite, moveBubblesY 4s ease-in-out infinite alternate; -o-animation: moveBubblesX 20s linear infinite, moveBubblesY 4s ease-in-out infinite alternate; } .x4 { left: 470px; -webkit-transform: scale(0.75); -moz-transform: scale(0.75); transform: scale(0.75); opacity: 0.35; -webkit-animation: moveBubblesX 18s linear infinite, moveBubblesY 3s ease-in-out infinite alternate; -moz-animation: moveBubblesX 18s linear infinite, moveBubblesY 3s ease-in-out infinite alternate; -o-animation: moveBubblesX 18s linear infinite, moveBubblesY 3s ease-in-out infinite alternate; } .x5 { left: 150px; -webkit-transform: scale(0.8); -moz-transform: scale(0.8); transform: scale(0.8); opacity: 0.3; -webkit-animation: moveBubblesX 17s linear infinite, moveBubblesY 5s ease-in-out infinite alternate; -moz-animation: moveBubblesX 17s linear infinite, moveBubblesY 5s ease-in-out infinite alternate; -o-animation: moveBubblesX 17s linear infinite, moveBubblesY 5s ease-in-out infinite alternate; } .x6 { -webkit-transform: scale(0.9); -moz-transform: scale(0.9); transform: scale(0.9); opacity: 0.2; -webkit-animation: moveBubblesX 15s linear infinite, moveBubblesYOpposite 4s ease-in-out infinite alternate; -moz-animation: moveBubblesX 15s linear infinite, moveBubblesYOpposite 4s ease-in-out infinite alternate; -o-animation: moveBubblesX 15s linear infinite, moveBubblesYOpposite 4s ease-in-out infinite alternate; } .x7 { left: 200px; -webkit-transform: scale(0.6); -moz-transform: scale(0.6); transform: scale(0.6); opacity: 0.5; -webkit-animation: moveBubblesX 21s linear infinite, moveBubblesYOpposite 3s ease-in-out infinite alternate; -moz-animation: moveBubblesX 21s linear infinite, moveBubblesYOpposite 3s ease-in-out infinite alternate; -o-animation: moveBubblesX 21s linear infinite, moveBubblesYOpposite 3s ease-in-out infinite alternate; } .x8 { left: 350px; -webkit-transform: scale(0.8); -moz-transform: scale(0.8); transform: scale(0.8); opacity: 0.3; -webkit-animation: moveBubblesX 16s linear infinite, moveBubblesYOpposite 6s ease-in-out infinite alternate; -moz-animation: moveBubblesX 16s linear infinite, moveBubblesYOpposite 6s ease-in-out infinite alternate; -o-animation: moveBubblesX 16s linear infinite, moveBubblesYOpposite 6s ease-in-out infinite alternate; } .x9 { left: 470px; -webkit-transform: scale(0.75); -moz-transform: scale(0.75); transform: scale(0.75); opacity: 0.35; -webkit-animation: moveBubblesX 24s linear infinite, moveBubblesYOpposite 5s ease-in-out infinite alternate; -moz-animation: moveBubblesX 24s linear infinite, moveBubblesYOpposite 5s ease-in-out infinite alternate; -o-animation: moveBubblesX 24s linear infinite, moveBubblesYOpposite 5s ease-in-out infinite alternate; } .x10 { left: 150px; -webkit-transform: scale(0.8); -moz-transform: scale(0.8); transform: scale(0.8); opacity: 0.3; -webkit-animation: moveBubblesX 17s linear infinite, moveBubblesYOpposite 5s ease-in-out infinite alternate; -moz-animation: moveBubblesX 17s linear infinite, moveBubblesYOpposite 5s ease-in-out infinite alternate; -o-animation: moveBubblesX 17s linear infinite, moveBubblesYOpposite 5s ease-in-out infinite alternate; } #bubbles { height: 100%; padding: 150px 0; } body{ background-color:#97BEDB; overflow:hidden; } #submarine{ animation: MoveUpDown 10s easeInOut infinite; -webkit-animation: MoveUpDown 10s ease-In-Out infinite; transform-origin: 50% 50%; } @keyframes MoveUpDown { 0% {transform: none;} 25% {transform: translateY(-50px) translateX(20px) rotate(5deg);} 50% {transform: translateY(25px) translateX(-25px) rotate(-5deg);} 75% {transform: translateY(-50px) translateX(25px) rotate(-5deg);} 100% {transform: translateY(0px) translateX(0px) rotate(0deg);} } @-webkit-keyframes moveBubblesX { 0% { left: -1%; } 100% { left: 101%; } } @-webkit-keyframes moveBubblesY { 0% { margin-top:0px; } 100% { margin-top:150px; } } @-webkit-keyframes moveBubblesYOpposite { 0% { margin-top:0px; } 100% { margin-top:-100px; } }